﻿@model sqlflashcards.Models.Flashcard
@{
    ViewBag.Title = "SQL Flashcards - Home";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script type="text/javascript">

    $(function () {

        $('#showanswer').click(function () {
            $('#answerIndex').toggle();
        });

    });

</script>
<div id="flashcardStuff">
    <div id="questionIndex">
        @Model.question
    </div>
    <div id="answerIndex">
        @MvcHtmlString.Create(Html.Encode(Model.answer).Replace(Environment.NewLine, "<br />"))
        <br />
        <br />
        Source: @Model.source
        <br />
        <br />
        Link: <a href="@Model.sourceLink">@Model.sourceLink</a>
    </div>
    <ul id="menu">
        <li>@Html.ActionLink("<", "Index", new { cardId = (Model.sysID - 1).ToString(), direction = "Previous" })</li>
        <li>@Html.ActionLink("Add Card", "AddNew", "Home")</li>
        <li><a href="#" id="showanswer">Show Answer</a></li>
        <li>@Html.ActionLink("Edit", "Edit", new { cardId = (Model.sysID) })</li>
        <li>@Html.ActionLink("List", "List")</li>
        <li>@Html.ActionLink(">", "Index", new { cardId = (Model.sysID + 1).ToString(), direction = "Next" })
        </li>
    </ul>
</div>
